Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1604 Added property config to hide Alerts tab and message count on tab names #1605

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

nmgokhale
Copy link
Member

Fixes #1604

Added a new config option showAlertsTab (boolean) in propertiesConfig object. Default: true.
To test in harness -
Screenshot 2023-10-17 at 3 00 36 PM

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@nmgokhale nmgokhale self-assigned this Oct 17, 2023
@@ -51,6 +51,7 @@ class EditorForm extends React.Component {
this.state = {
showFieldPicker: false
};
this.showAlertsTab = props.controller ? get(props.controller.getPropertiesConfig(), "showAlertsTab", true) : true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not pass this down from properties-main instead? Similar to what we do with

rightFlyout={this.props.propertiesConfig.rightFlyout}

@nmgokhale nmgokhale force-pushed the option-to-hide-alerts-tab branch from 94a8273 to aec9365 Compare October 17, 2023 22:59
@@ -517,6 +517,7 @@ class PropertiesMain extends React.Component {
customPanels={this.props.customPanels}
rightFlyout={this.props.propertiesConfig.rightFlyout}
categoryView={this.props.propertiesConfig.categoryView}
showAlertsTab={(typeof this.props.propertiesConfig.showAlertsTab !== "undefined") ? this.props.propertiesConfig.showAlertsTab : true}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this check couldn't we do

showAlertsTab={ this.props.propertiesConfig.showAlertsTab !== false }

The in all cases besides false this would be true.

Signed-off-by: Neha Gokhale <[email protected]>
Copy link
Member

@matthoward366 matthoward366 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nmgokhale nmgokhale merged commit 401b42a into elyra-ai:main Oct 18, 2023
3 checks passed
@nmgokhale nmgokhale deleted the option-to-hide-alerts-tab branch October 18, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add property config to be able to hide "Alerts" tab and message count on tab names
2 participants